home *** CD-ROM | disk | FTP | other *** search
/ Especial Multimedia / Especial Multimedia.iso / Multimed / Prg / WAVPLUS.ZIP / WAVPLAY.WD_ / WAVPLAY.WD
Text File  |  1997-09-14  |  7KB  |  266 lines

  1. VERSION 2.00
  2. Begin Form WavPlay 
  3.    BackColor       =   &H00C0C0C0&
  4.    BorderStyle     =   1  'Fixed Single
  5.    Caption         =   "WAV Player"
  6.    ClientHeight    =   4185
  7.    ClientLeft      =   1095
  8.    ClientTop       =   1485
  9.    ClientWidth     =   5535
  10.    ControlBox      =   0   'False
  11.    Height          =   4590
  12.    Left            =   1035
  13.    LinkTopic       =   "Form2"
  14.    MaxButton       =   0   'False
  15.    MinButton       =   0   'False
  16.    ScaleHeight     =   4185
  17.    ScaleWidth      =   5535
  18.    Top             =   1140
  19.    Width           =   5655
  20.    Begin CommandButton CmdWait 
  21.       BackColor       =   &H00C0C0C0&
  22.       Caption         =   "Play WAV &Wait"
  23.       Height          =   375
  24.       Left            =   3360
  25.       TabIndex        =   2
  26.       Top             =   1440
  27.       Width           =   1815
  28.    End
  29.    Begin CommandButton CmdStop 
  30.       BackColor       =   &H00C0C0C0&
  31.       Caption         =   "&Stop WAV"
  32.       Height          =   375
  33.       Left            =   3360
  34.       TabIndex        =   5
  35.       Top             =   2520
  36.       Width           =   1815
  37.    End
  38.    Begin CommandButton CmdInfo 
  39.       BackColor       =   &H00C0C0C0&
  40.       Caption         =   "WAV &Info"
  41.       Height          =   375
  42.       Left            =   3360
  43.       TabIndex        =   6
  44.       Top             =   3120
  45.       Width           =   1815
  46.    End
  47.    Begin CommandButton CmdLoop 
  48.       BackColor       =   &H00C0C0C0&
  49.       Caption         =   "&Loop Play WAV"
  50.       Height          =   375
  51.       Left            =   3360
  52.       TabIndex        =   4
  53.       Top             =   2160
  54.       Width           =   1815
  55.    End
  56.    Begin CommandButton CmdMCI 
  57.       BackColor       =   &H00C0C0C0&
  58.       Caption         =   "&MCI Play\Record"
  59.       Height          =   375
  60.       Left            =   3360
  61.       TabIndex        =   3
  62.       Top             =   1800
  63.       Width           =   1815
  64.    End
  65.    Begin CommandButton CmdNormal 
  66.       BackColor       =   &H00C0C0C0&
  67.       Caption         =   "Normal &Play WAV"
  68.       Height          =   375
  69.       Left            =   3360
  70.       TabIndex        =   1
  71.       Top             =   1080
  72.       Width           =   1815
  73.    End
  74.    Begin FileListBox File1 
  75.       Height          =   1980
  76.       Left            =   360
  77.       Pattern         =   "*.WAV"
  78.       TabIndex        =   9
  79.       Top             =   1920
  80.       Width           =   2655
  81.    End
  82.    Begin DirListBox Dir1 
  83.       Height          =   1155
  84.       Left            =   360
  85.       TabIndex        =   8
  86.       Top             =   600
  87.       Width           =   2655
  88.    End
  89.    Begin DriveListBox Drive1 
  90.       Height          =   315
  91.       Left            =   360
  92.       TabIndex        =   7
  93.       Top             =   240
  94.       Width           =   2655
  95.    End
  96.    Begin CommandButton CmdOkay 
  97.       BackColor       =   &H00C0C0C0&
  98.       Cancel          =   -1  'True
  99.       Caption         =   "O &K A Y"
  100.       Height          =   375
  101.       Left            =   3360
  102.       TabIndex        =   0
  103.       Top             =   3480
  104.       Width           =   1815
  105.    End
  106.    Begin Image Image1 
  107.       Height          =   480
  108.       Left            =   4080
  109.       Picture         =   WAVPLAY.FRX:0000
  110.       Top             =   240
  111.       Width           =   480
  112.    End
  113. End
  114.  
  115. Sub CmdInfo_Click ()
  116.     i% = File1.ListIndex
  117.     If i% = -1 Then
  118.         MsgBox "No WAV file selected!", 16, "User Error"
  119.         Exit Sub
  120.         End If
  121.     If HowManyWavPlayDevices() = 0 Then
  122.         MsgBox "No sound card recognized!", 16, "Missing Device"
  123.         Exit Sub
  124.         End If
  125.     FullPath$ = Dir1.Path
  126.     FullPath$ = BackSlashAdd(FullPath$) + File1.List(File1.ListIndex)
  127.     FormPassString = FullPath$
  128.     Screen.MousePointer = 11
  129.     WavInfo.Show 1
  130. End Sub
  131.  
  132. Sub CmdLoop_Click ()
  133.     i% = File1.ListIndex
  134.     If i% = -1 Then
  135.         MsgBox "No WAV file selected!", 16, "User Error"
  136.         Exit Sub
  137.         End If
  138.     If HowManyWavPlayDevices() = 0 Then
  139.         MsgBox "No sound card recognized!", 16, "Missing Device"
  140.         Exit Sub
  141.         End If
  142.     FullPath$ = Dir1.Path
  143.     FullPath$ = BackSlashAdd(FullPath$) + File1.List(File1.ListIndex)
  144.     dummy% = PlayWavLoop(FullPath$)
  145.     If dummy% = 0 Then
  146.         MsgBox "Incompatible file format!", 16, "File Error"
  147.         End If
  148. End Sub
  149.  
  150. Sub CmdMCI_Click ()
  151.     i% = File1.ListIndex
  152.     If i% = -1 Then
  153.         MsgBox "No WAV file selected!", 16, "User Error"
  154.         Exit Sub
  155.         End If
  156.     If HowManyWavPlayDevices() = 0 Then
  157.         MsgBox "No sound card recognized!", 16, "Missing Device"
  158.         Exit Sub
  159.         End If
  160.     FullPath$ = Dir1.Path
  161.     FullPath$ = BackSlashAdd(FullPath$) + File1.List(File1.ListIndex)
  162.     FormPassString = FullPath$
  163.     Screen.MousePointer = 11
  164.     MCIwav.Show 1
  165. End Sub
  166.  
  167. Sub CmdNormal_Click ()
  168.     i% = File1.ListIndex
  169.     If i% = -1 Then
  170.         MsgBox "No WAV file selected!", 16, "User Error"
  171.         Exit Sub
  172.         End If
  173.     If HowManyWavPlayDevices() = 0 Then
  174.         MsgBox "No sound card recognized!", 16, "Missing Device"
  175.         Exit Sub
  176.         End If
  177.     FullPath$ = Dir1.Path
  178.     FullPath$ = BackSlashAdd(FullPath$) + File1.List(File1.ListIndex)
  179.     dummy% = PlayWavNoWait(FullPath$)
  180.     If dummy% = 0 Then
  181.         MsgBox "Incompatible file format!", 16, "File Error"
  182.         End If
  183. End Sub
  184.  
  185. Sub CmdOkay_Click ()
  186.     Unload Me
  187. End Sub
  188.  
  189. Sub CmdStop_Click ()
  190.     If HowManyWavPlayDevices() = 0 Then
  191.         MsgBox "No sound card recognized!", 16, "Missing Device"
  192.         Exit Sub
  193.         End If
  194.     dummy% = StopWavLoop()
  195. End Sub
  196.  
  197. Sub CmdWait_Click ()
  198.     i% = File1.ListIndex
  199.     If i% = -1 Then
  200.         MsgBox "No WAV file selected!", 16, "User Error"
  201.         Exit Sub
  202.         End If
  203.     If HowManyWavPlayDevices() = 0 Then
  204.         MsgBox "No sound card recognized!", 16, "Missing Device"
  205.         Exit Sub
  206.         End If
  207.     FullPath$ = Dir1.Path
  208.     FullPath$ = BackSlashAdd(FullPath$) + File1.List(File1.ListIndex)
  209.     Screen.MousePointer = 11
  210.     dummy% = PlayWavWait(FullPath$)
  211.     Screen.MousePointer = 0
  212.     If dummy% = 0 Then
  213.         MsgBox "Incompatible file format!", 16, "File Error"
  214.         End If
  215. End Sub
  216.  
  217. Sub Dir1_Change ()
  218.     Screen.MousePointer = 11
  219.     ChDir Dir1.Path
  220.     File1.Path = Dir1.Path
  221.     Screen.MousePointer = 0
  222. End Sub
  223.  
  224. Sub Drive1_Change ()
  225.     On Error GoTo SelDrvBad
  226.     Screen.MousePointer = 11
  227.     ChDrive Drive1.Drive
  228.     Dir1.Path = Drive1.Drive
  229.     Screen.MousePointer = 0
  230.     Exit Sub
  231. SelDrvBad:
  232.     Screen.MousePointer = 0
  233.     msg$ = "Drive Error " + UCase$(Left$(Drive1.Drive, 1)) + ":"
  234.     response = MsgBox("Can NOT Access Drive!", 21, msg$)
  235.     If response = 4 Then
  236.         Screen.MousePointer = 11
  237.         Resume 0
  238.         End If
  239.     WinRoot
  240.     Exit Sub
  241. End Sub
  242.  
  243. Sub File1_DblClick ()
  244.     CmdNormal_Click
  245. End Sub
  246.  
  247. Sub Form_Load ()
  248.     FormCenterScreen Me
  249.     Screen.MousePointer = 0
  250. End Sub
  251.  
  252. Sub Form_Paint ()
  253.     DoForm3D Me, "raised", 2, 0
  254.     DoForm3D Me, "sunken", 2, 2
  255. End Sub
  256.  
  257. Sub WinRoot ()
  258.     Screen.MousePointer = 11
  259.     WinDir$ = Left$(GetWinDir(), 3)
  260.     Drive1.Drive = WinDir$
  261.     ChDrive WinDir$
  262.     Dir1.Path = CurDir$
  263.     Screen.MousePointer = 0
  264. End Sub
  265.  
  266.